mround <- function(x, base){
  out <- rep(NA, 2)
  out[1] <- base * floor(x[1] / base)
  out[2] <- base * ceiling(x[2] / base)
  return(out)
}